using System;
using System.Data.Entity.ModelConfiguration;
using System.Data.Common;
using System.Data.Entity;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using DomainLayer.Data.Entities;

namespace Infrastructure.Data.Mapping
{
	public class AreaExpressCompanyMap : EntityTypeConfiguration<AreaExpressCompany>
	{
		public AreaExpressCompanyMap()
		{
			// Primary Key
			this.HasKey(t => t.AreaExpressCompanyID);

			// Properties
			this.Property(t => t.AreaID)
				.IsRequired()
				.HasMaxLength(50);
				
			// Table & Column Mappings
			this.ToTable("AreaExpressCompany");
			this.Property(t => t.AreaExpressCompanyID).HasColumnName("AreaExpressCompanyID");
			this.Property(t => t.AreaID).HasColumnName("AreaID");
			this.Property(t => t.ExpressCompanyID).HasColumnName("ExpressCompanyID");
			this.Property(t => t.LimitTime).HasColumnName("LimitTime");
			this.Property(t => t.BeginTime).HasColumnName("BeginTime");
			this.Property(t => t.EndTime).HasColumnName("EndTime");
			this.Property(t => t.Sorting).HasColumnName("Sorting");
			this.Property(t => t.IsDeleted).HasColumnName("IsDeleted");
			this.Property(t => t.CreatBy).HasColumnName("CreatBy");
			this.Property(t => t.CreatStation).HasColumnName("CreatStation");
			this.Property(t => t.CreatTime).HasColumnName("CreatTime");
			this.Property(t => t.UpdateBy).HasColumnName("UpdateBy");
			this.Property(t => t.UpdateTime).HasColumnName("UpdateTime");
			this.Property(t => t.UpdateStation).HasColumnName("UpdateStation");
		}
	}
}

